Skip to content

feat(workspace): rename and color workspaces from the sidebar and CLI - #702

Merged
moreih29 merged 2 commits into
developfrom
feat/workspace-color
Nov 19, 2026
Merged

moreih29 merged 2 commits into
developfrom
feat/workspace-color

Conversation

@moreih29

Copy link
Copy Markdown
Owner

Summary

A workspace had a colorTone (subdued, default, prominent, pinned) that only storage and the IPC contract knew; no screen or CLI set or showed it, and the sidebar had no way to rename a workspace. This turns it into a color the user picks and adds rename.

  • color: auto or one of eight colors mapped in order to the git lane tokens 0–7. auto keeps today's look (the agent view's hash color).
  • Sidebar: the row's context menu gains "Rename…" (inline, Enter saves, Esc cancels, empty names are not saved) and "Color ›" (Auto and the eight colors, the chosen one checked). The color goes on the row's folder icon, so it is not confused with the connection dot.
  • Agent view: the group dot, task tag and panel chip use the chosen color, or the hash color for auto.
  • CLI: nexus workspace edit <workspace> [--name N] [--color C] and workspace add --color; --json output includes color. Editing another workspace asks under a new consent kind, workspaceEdit. A task (worktree) follows its parent's color and is refused. docs/CLI.md and the agent context are updated.
  • Storage: migration v10 adds color TEXT NOT NULL DEFAULT 'auto'. Every existing workspace starts as auto. The old color_tone column stays, unused, so an older build opening the same database can still insert rows.
  • The remote workspace list does not carry the color (it never carried the tone); showing it on other devices would need a protocol change.

Tests

  • Migration v10 (column kept, every row auto, an older build's insert still reads as auto) and color round trip in storage-global.test.ts.
  • workspace edit and add --color argument handling in workspace-sidebar.test.ts.
  • bun run typecheck, bun run check:ci, unit plus storage and reorder integration tests (4471).

Manual check

Rename from the context menu (Korean IME Enter included), pick colors in light and dark themes, set Auto back, run nexus workspace edit … --color and see the sidebar update; open an existing database once and check the migration.

🤖 Generated with Claude Code

moreih29 and others added 2 commits November 20, 2026 01:05
Replace the unused colorTone enum with a workspace color: "auto" or one of
the theme's lane colors (red, amber, lime, green, cyan, blue, violet, pink).
Migration v10 adds the color column (every workspace starts as "auto") and
drops color_tone.

- Sidebar row menu: Rename… (inline) and Color ›. The color tints the row's
  folder icon, so it is not mistaken for the connection status dot.
- Agent view uses the chosen color, falling back to the id-hash lane color
  for "auto".
- CLI: `nexus workspace edit <ws> --name/--color`, `workspace add --color`,
  `color` in --json. New consent kind workspaceEdit.
- docs/CLI.md and the agent context note updated.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Only add the color column. Older builds that open the same database still
insert into color_tone, so dropping it would break adding a workspace after a
rollback. Nothing reads or writes it now; it is kept for compatibility.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@moreih29
moreih29 merged commit 8c5be44 into develop Nov 19, 2026
7 checks passed
@moreih29
moreih29 deleted the feat/workspace-color branch November 19, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant